package com.iqiyi.config;

import org.springframework.context.annotation.Bean;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.oas.annotations.EnableOpenApi;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

/**
 * @auther Z_zjl
 * @date 2022/12/17 13:12
 * @Description Swagger的配置
 */
@EnableOpenApi//开启Swagger3
public class SwaggerConfig {
    @Bean
    public Docket createRestApi(){
        return new Docket(DocumentationType.OAS_30)
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.iqiyi.controller"))
                .build();
    }
}
